<?php
class MicoolComponent extends Object
{
    function startup(&$controller)
    {
        $this->controller = $controller;
    }
	
    function render()
    {
		Loader::import('app.vendors.micool.ValidationCode');
        $vsafecode = new validationSafeCode();
        switch (@intval($_GET['T'])) {
        case 1 :
            $vsafecode->SetCon('CS', 16, 2, 1, '#000000', 0, 'img', 66, 28, 'png', 'LDXG', 40, 3, 3, '');
            break;
        case 2 :
            $vsafecode->SetCon('CT', 14, 2, 2, '#000000', 0, 'img', 66, 28, 'png', 'LDXG', 40, 3, 3, '');
            break;
        case 3 :
            $vsafecode->SetCon('E', 14, 5, 5, '#000000', 0, 'img', 66, 28, 'png', 'LDXCG', 50, 5, 3, '');
            break;
        case 4 :
            $vsafecode->SetCon('e', 14, 5, 3, '#000000', 0, 'img', 66, 28, 'png', 'LDXCG', 50, 5, 3, '');
            break;
        case 5 :
            $vsafecode->SetCon('EeD', 14, 5, 3, '#000000', 0, '#FFFFFF', 66, 28, 'png', 'RLDXCG', 50, 5, 3, '');
            break;
        case 6 :
            $vsafecode->SetCon('ED', 15, 4, 5, '#000000', 0, '#FFFFFF', 70, 28, 'png', 'LDXCG', 50, 5, 3, '');
            break;
        case 7 :
            $vsafecode->SetCon('CS', 20, 5, 1, '#000000', 0, '#FFFFFF', 300, 60, 'png', 'RLDXCG', 50, 5, 3, '');
            break;
        case 8 :
            $vsafecode->SetCon('D', 14, 5, 5, '#5364A5', 0, '#FFFFFF', 70, 30, 'png', 'LDG', 70, 8, 1, '');
            break;
        case 9 :
            $vsafecode->SetCon('eD', 14, 4, 5, '#5399A5', 0, '#FFFFFF', 100, 30, 'png', 'RLDXCG', 70, 6, 9, '');
            break;
        case 10 :
            $vsafecode->SetCon('D', 15, 4, 5, '#000000', 0, '#FFFFFF', 70, 30, 'png', 'LDXCG', 50, 5, 3, '');
            break;
        case 11 :
            $vsafecode->SetCon('D', 15, 3, 4, '#5364A5', 0, '#FFFFFF', 50, 30, 'png', 'RLDXG', 50, 5, 0, '');
            break;
        case 12 :
            $vsafecode->SetCon('D', 16, 5, 4, '#5364A5', 0, 'img', 75, 33, 'png', 'LDG', 60, 6, 4, '');
            break;
        default :
            $vsafecode->SetCon('D', 16, 5, 5, '#000000', 0, '#FFFFFF', 70, 30, 'png', 'LDXCG', 50, 5, 3, '');
            break;
        }
        //$this->controller->C_session->write('captcha', $vsafecode->VC_Safe_Code);
        $this->controller->C_session->write('captcha', md5(strtolower($vsafecode->VC_Safe_Code)));
    }
}
?>